package cn.gson.crm.controller.emplo;

import java.util.List;

import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import cn.gson.crm.controller.BaseServlet;
import cn.gson.crm.model.dao.JobFollowDao;
import cn.gson.crm.model.dao.StudentDao;
import cn.gson.crm.model.dao.StudentPoDao;
import cn.gson.crm.model.entity.Student;
import cn.gson.crm.model.po.FollowStudentPo;
import cn.gson.crm.model.po.JobFollowPo;

/**
 * 登录后状态
 */
@WebServlet("/after/login")
public class AfterLoginServlet extends BaseServlet {
	private static final long serialVersionUID = 1L;
    private StudentDao stuDao = new StudentDao();
    private JobFollowDao jobFDao = new JobFollowDao();
    private StudentPoDao stuPoDao = new StudentPoDao();
    
	@Override
	protected void get(HttpServletRequest request, HttpServletResponse response) throws Exception {
		super.get(request, response);
		List<Student> stuList = stuDao.displayNewEnterStu("正常", "未分配");
		request.setAttribute("stuList", stuList);
		List<Student> stuAllocationList = stuDao.displayNewEnterStu("正常", "已分配");
		request.setAttribute("stuAllocationList", stuAllocationList);
		List<JobFollowPo> jobFPList = jobFDao.displayNewMSStu("正常", "已分配", 9);
		request.setAttribute("jobFPList", jobFPList); 
		List<FollowStudentPo> followUpList = stuPoDao.getNewFollow("正常", 5, 3);
		request.setAttribute("followUpList", followUpList);
		forward("employee/emplo_login.jsp");
		
	}
	@Override
	protected void post(HttpServletRequest request, HttpServletResponse response) throws Exception {
		super.post(request, response);
		
	}

}
